<?xml version="1.0" encoding="UTF-8"?>

<!-- Copyright 2007 XBRL International. All Rights Reserved. -->

<link:linkbase
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:generic="http://xbrl.org/2008/generic"
  xmlns:va="http://xbrl.org/2008/assertion/value"
  xmlns:variable="http://xbrl.org/2008/variable"
  xmlns:cf="http://xbrl.org/2008/filter/concept"
  xmlns:gf="http://xbrl.org/2008/filter/general"
  xmlns:pf="http://xbrl.org/2008/filter/period"
  xmlns:xfi="http://www.xbrl.org/2008/function/instance" 
  xmlns:label="http://xbrl.org/2008/label"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  xmlns:ci="http://www.UBmatrix.com/Patterns/MovementsAnalysis"
  xmlns:xbrli="http://www.xbrl.org/2003/instance"

  xsi:schemaLocation="
  http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd
  http://xbrl.org/2008/generic ../../core_schemas/generic-link.xsd
  http://xbrl.org/2008/assertion/value http://www.xbrl.org/2008/value-assertion.xsd
  http://xbrl.org/2008/variable ../../core_schemas/variable.xsd
  http://xbrl.org/2008/filter/concept ../../core_schemas/concept-filter.xsd
  http://xbrl.org/2008/filter/period ../../core_schemas/period-filter.xsd
  http://xbrl.org/2008/filter/general ../../core_schemas/general-filter.xsd
  http://xbrl.org/2008/label http://www.xbrl.org/2008/generic-label.xsd
  ">
  
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/element-label" xlink:href="http://www.xbrl.org/2008/generic-label.xsd#element-label" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-set" xlink:href="../../core_schemas/variable.xsd#variable-set" xlink:type="simple"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-filter" xlink:href="../../core_schemas/variable.xsd#variable-filter" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.xbrl.org/2008/role/link" xlink:href="../../core_schemas/generic-link.xsd#standard-link-role" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.xbrl.org/2008/role/label/satisfied" xlink:href="../formula-roles.xsd#label-satisfied" xlink:type="simple"/>
  <link:roleRef roleURI="http://www.xbrl.org/2008/role/label/notSatisfied" xlink:href="../formula-roles.xsd#label-not-satisfied" xlink:type="simple"/>

  <generic:link xlink:type="extended"
    xlink:role="http://www.xbrl.org/2008/role/link">

    <va:valueAssertion xlink:type="resource" 
      xlink:label="movement-assertion"
      id="movement-assertion"
      aspectModel="non-dimensional" implicitFiltering="false" 
      test="abs(sum($beginningBalance) + 
            sum(for $c in $changes return
                if (xfi:concept-balance(node-name($c)) eq 'credit') then -$c
                else $c) - 
            sum($endingBalance)) lt 1.00" />

    <!-- Label for the assertions when not successful -->
    <label:label xlink:type="resource" xlink:label="movement-assertion-message" 
      xlink:role="http://www.xbrl.org/2008/role/label/notSatisfied" 
      xml:lang="en">The movement in {$linkRoleDef} of {xfi:concept-label($movementParent,'','','en-US')} in context {$changes[1]/@contextRef} is out of balance by {
              abs(sum($beginningBalance) + 
                  sum(for $c in $changes return
                           if (starts-with(local-name($c),'Disposals')) then -$c
                           else $c) - 
                  sum($endingBalance))
              }</label:label>
                                                                        
    <!-- Label for the assertions when successful -->
    <label:label xlink:type="resource" xlink:label="movement-assertion-message" 
      xlink:role="http://www.xbrl.org/2008/role/label/satisfied" 
      xml:lang="en">The movement in {$linkRoleDef} of {xfi:concept-label($movementParent,'','','en-US')} in context {$changes[1]/@contextRef} is ok.</label:label>   
                                                                        
    <generic:arc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/element-label"
      xlink:from="movement-assertion" xlink:to="movement-assertion-message" order="1.0"/>

    <!-- function xfi:navigate-relationships -->
    <variable:function xlink:type="resource" xlink:label="navigate-relationships"
       name="xfi:navigate-relationships"
       output="xs:anyAtomicType*">
         <!-- source concept to begin navigation -->
         <variable:input type="xs:QName" />
         <!-- link role -->
         <variable:input type="xs:anyURI" />
         <!-- arc role -->
         <variable:input type="xs:anyURI" />
         <!-- axis (child, parent, etc) -->
         <variable:input type="xs:string" />
         <!-- generations limit or zero for unlimited -->
         <variable:input type="xs:integer" />
    </variable:function>

    <variable:function xlink:type="resource" xlink:label="navigate-relationships"
       name="xfi:navigate-relationships"
       output="xs:anyAtomicType*">
         <!-- source concept to begin navigation -->
         <variable:input type="xs:QName" />
         <!-- link role -->
         <variable:input type="xs:anyURI" />
         <!-- arc role -->
         <variable:input type="xs:anyURI" />
         <!-- axis (child, parent, etc) -->
         <variable:input type="xs:string" />
         <!-- generations limit or zero for unlimited -->
         <variable:input type="xs:integer" />
         <!-- qnames of arc attributes -->
         <variable:input type="xs:QName*" />
    </variable:function>

    <!-- function xfi:role-definition -->
    <variable:function xlink:type="resource" xlink:label="concept-label"
       name="xfi:role-definition"
       output="xs:string">
         <!-- role -->
         <variable:input type="xs:anyURI" />
    </variable:function>

    <!-- function xfi:concept-label -->
    <variable:function xlink:type="resource" xlink:label="concept-label"
       name="xfi:concept-label"
       output="xs:string">
         <!-- concept having the label -->
         <variable:input type="xs:QName" />
         <!-- extended link role -->
         <variable:input type="xs:anyURI" />
         <!-- label resource role -->
         <variable:input type="xs:anyURI" />
         <!-- language code (eg "en") -->
         <variable:input type="xs:language" />
    </variable:function>

    <!-- (1) general variable iterates linkURIs of presentation links -->
    <variable:generalVariable xlink:type="resource" xlink:label="linkRole" bindAsSequence="false"
      select="xfi:linkbase-link-roles('http://www.xbrl.org/2003/arcrole/parent-child')"  />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="linkRole" order="1.0"
      name="linkRole" />

    <!-- (2) general variable is linkrole definition (if there is one) otherwise its URI -->
    <variable:generalVariable xlink:type="resource" xlink:label="linkRoleDef" bindAsSequence="false"
      select="(xfi:role-definition($linkRole),$linkRole)[1]"  />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="linkRoleDef" order="1.0"
      name="linkRoleDef" />

    <!-- (3) general variable is QNames of movement parents (where name ends with RollForward) -->
    <variable:generalVariable xlink:type="resource" xlink:label="mvtParents" bindAsSequence="false"
      select="for $maybeParent in
              xfi:navigate-relationships(
                QName('http://www.xbrl.org/2008/function/instance','root'),
                $linkRole,
                'http://www.xbrl.org/2003/arcrole/parent-child',
                'descendant',
                8) return
                if (ends-with(local-name-from-QName($maybeParent),'RollForward'))
                then $maybeParent
                else ()"  />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="mvtParents" order="1.0"
      name="movementParent" />

    <!-- (4) general variable is QNames + prefLbl of movement items (2 levels descendants) -->
    <variable:generalVariable xlink:type="resource" xlink:label="mvtRels" bindAsSequence="true"
      select="xfi:navigate-relationships(
                $movementParent, 
                $linkRole,
                'http://www.xbrl.org/2003/arcrole/parent-child',
                'descendant',
                2,
                (QName('','preferredLabel')))"  />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="mvtRels" order="1.0"
      name="movementRels" />

    <!-- (5) general variable is first subsequence, of movementQNames -->
    <variable:generalVariable xlink:type="resource" xlink:label="mvtQNames" bindAsSequence="true"
      select="for $c in (count($movementRels) idiv 2) return subsequence($movementRels,1,$c)" /> 
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="mvtQNames" order="1.0"
      name="movementQNames" />

    <!-- (6) general variable is second subsequence, of movementPreferredLabels -->
    <variable:generalVariable xlink:type="resource" xlink:label="mvtPreferredLabels" bindAsSequence="true"
      select="for $c in (count($movementRels) idiv 2) return subsequence($movementRels,$c+1,$c)" /> 
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="mvtPreferredLabels" order="1.0"
      name="movementPreferredLabels" />

    <!-- (7) fact variable is non-total change items for movement, 
             partition by duration interval -->
    <variable:factVariable xlink:type="resource" xlink:label="v_changes" bindAsSequence="true" />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="v_changes" order="1.0"
      name="changes" />
    <variable:variableFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" 
      complement="false" cover="true"
      xlink:from="v_changes" xlink:to="f_changes" order="1.0"/>
    <cf:conceptPeriodType periodType="duration" xlink:type="resource" xlink:label="f_changes"/>
    <cf:conceptDataType strict="false" xlink:type="resource" xlink:label="f_changes">
      <cf:type><cf:qname>xs:decimal</cf:qname></cf:type>
    </cf:conceptDataType>
    <gf:general xlink:type="resource" xlink:label="f_changes"
      test="some $r in index-of($movementQNames, node-name())  satisfies
                 $movementPreferredLabels[$r] ne 'http://www.xbrl.org/2003/role/totalLabel'" />

    <!-- (8) fact variable is ending balance item for movement, 
             partition by duration end -->
    <variable:factVariable xlink:type="resource" xlink:label="v_endBal" bindAsSequence="true" fallbackValue="()" />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="v_endBal" order="1.0"
      name="endingBalance" />
    <variable:variableFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" 
      complement="false" cover="true"
      xlink:from="v_endBal" xlink:to="f_endBal" order="1.0"/>
    <cf:conceptPeriodType periodType="instant" xlink:type="resource" xlink:label="f_endBal"/>
    <cf:conceptDataType strict="false" xlink:type="resource" xlink:label="f_endBal">
      <cf:type><cf:qname>xs:decimal</cf:qname></cf:type>
    </cf:conceptDataType>
    <pf:period xlink:type="resource" xlink:label="f_endBal" 
      test="if (xfi:is-instant-period(.))
            then (xfi:period-instant(.) eq xfi:period-end(xfi:period($changes[1])))
            else false() "/>
    <gf:general xlink:type="resource" xlink:label="f_endBal" 
      test="some $r in index-of($movementQNames, node-name())  satisfies
                 $movementPreferredLabels[$r] eq 'http://www.xbrl.org/2003/role/periodEndLabel'" />

    <!-- (9) fact variable is beginning balance item for movement, 
             partition by duration interval -->
    <variable:factVariable xlink:type="resource" xlink:label="v_begBal" bindAsSequence="true" fallbackValue="()" />
    <variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" 
      xlink:from="movement-assertion" xlink:to="v_begBal" order="1.0"
      name="beginningBalance" />
    <variable:variableFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" 
      complement="false" cover="true"
      xlink:from="v_begBal" xlink:to="f_begBal" order="1.0"/>
    <cf:conceptPeriodType periodType="instant" xlink:type="resource" xlink:label="f_begBal"/>
    <cf:conceptDataType strict="false" xlink:type="resource" xlink:label="f_begBal">
      <cf:type><cf:qname>xs:decimal</cf:qname></cf:type>
    </cf:conceptDataType>
    <pf:period xlink:type="resource" xlink:label="f_endBal" 
      test="if (xfi:is-instant-period(.))
            then (xfi:period-instant(.) eq xfi:period-start(xfi:period($changes[1])))
            else false() "/>
    <gf:general xlink:type="resource" xlink:label="f_begBal"
      test="some $r in index-of($movementQNames, node-name())  satisfies
                 $movementPreferredLabels[$r] eq 'http://www.xbrl.org/2003/role/periodStartLabel'" />

  </generic:link>

</link:linkbase>
